\hypertarget{pid_8h}{
\section{workspace/WR/Source/pid.h File Reference}
\label{pid_8h}\index{workspace/WR/Source/pid.h@{workspace/WR/Source/pid.h}}
}


A PID regulator.  


\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structpid__str}{pid\_\-str}
\begin{DoxyCompactList}\small\item\em Structure representing a PID regulator. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{pid_8h_a0b2bf50a6c9f6ab29c0043e777b9bca1}{pid\_\-init} (\hyperlink{structpid__str}{pid\_\-str} \&p, int kp, int kd, int ki)
\begin{DoxyCompactList}\small\item\em Initialize PID regulator. \item\end{DoxyCompactList}\item 
long \hyperlink{pid_8h_a3d0ebdc592f3e8af789c8fe7eecf703c}{pid\_\-getval} (\hyperlink{structpid__str}{pid\_\-str} \&p, long e)
\begin{DoxyCompactList}\small\item\em Get the PID regulation value for the current difference (epsilon). \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
A PID regulator. 

\subsection{Function Documentation}
\hypertarget{pid_8h_a3d0ebdc592f3e8af789c8fe7eecf703c}{
\index{pid.h@{pid.h}!pid\_\-getval@{pid\_\-getval}}
\index{pid\_\-getval@{pid\_\-getval}!pid.h@{pid.h}}
\subsubsection[{pid\_\-getval}]{\setlength{\rightskip}{0pt plus 5cm}long pid\_\-getval ({\bf pid\_\-str} \& {\em p}, \/  long {\em e})}}
\label{pid_8h_a3d0ebdc592f3e8af789c8fe7eecf703c}


Get the PID regulation value for the current difference (epsilon). 


\begin{DoxyParams}{Parameters}
\item[{\em p}]A PID to return a value from \item[{\em e}]Current difference between the given value and the real value \end{DoxyParams}
\begin{DoxyWarning}{Warning}
Call void \hyperlink{pid_8h_a0b2bf50a6c9f6ab29c0043e777b9bca1}{pid\_\-init(pid\_\-str \&p, int kp, int kd, int ki)} before starting to use this function 
\end{DoxyWarning}
\hypertarget{pid_8h_a0b2bf50a6c9f6ab29c0043e777b9bca1}{
\index{pid.h@{pid.h}!pid\_\-init@{pid\_\-init}}
\index{pid\_\-init@{pid\_\-init}!pid.h@{pid.h}}
\subsubsection[{pid\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void pid\_\-init ({\bf pid\_\-str} \& {\em p}, \/  int {\em kp}, \/  int {\em kd}, \/  int {\em ki})}}
\label{pid_8h_a0b2bf50a6c9f6ab29c0043e777b9bca1}


Initialize PID regulator. 


\begin{DoxyParams}{Parameters}
\item[{\em p}]A PID to initialize \item[{\em kp}]A power of the proportional part \item[{\em kd}]A power of the derivative part \item[{\em ki}]A power of the integral part \end{DoxyParams}
\begin{DoxyWarning}{Warning}
Call this before calling long \hyperlink{pid_8h_a3d0ebdc592f3e8af789c8fe7eecf703c}{pid\_\-getval(pid\_\-str \&p, long e)} 
\end{DoxyWarning}
